home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / MacApp / MacApp CD Release / MacApp 2.0.1 (Many Libraries) / Libraries / Debug.r next >
Encoding:
Text File  |  1990-10-25  |  7.3 KB  |  223 lines  |  [TEXT/MPS ]

  1. /*
  2.     Debug.r
  3.     MacApp® Debugging Resources
  4.     Copyright © 1986-1990 Apple Computer, Inc.  All rights reserved.
  5. */
  6.  
  7. /* • Auto-Include the requirements for this source */
  8. #ifndef __TYPES.R__
  9. #include "Types.r"
  10. #endif
  11.  
  12. #ifndef __MacAppTypes__
  13. #include "MacAppTypes.r"
  14. #endif
  15.  
  16. #ifndef __ViewTypes__
  17. #include "ViewTypes.r"
  18. #endif
  19.  
  20. #define      kDebugBuzzStrings            251
  21. #define      kDebugErrorStrings            252
  22. #define      kTranscriptWindowType        901
  23. #define      kForDebugging                128
  24. #define         kDebugSICN                    901
  25.  
  26. #define        kIDTranscriptView            'trns'
  27.  
  28.  
  29. /* memory stuff */
  30. resource 'mem!' (kForDebugging,
  31. #if qNames
  32.     "ForDebugging",
  33. #endif
  34.     purgeable) {
  35.     2048,                // Add to temporary reserve
  36.     0,                    // Add to permanent reserve
  37.     0                    // stack space
  38. };
  39.  
  40.  
  41. resource 'seg!' (kForDebugging,
  42. #if qNames
  43.     "ForDebugging",
  44. #endif
  45.     purgeable) {
  46.     {
  47.         "GDebug";
  48.         "GDebugger";
  49.         "GFields";
  50.         "GInspector";
  51.         "GNonRes";                                // Window resizing, beinport, drawprintfeedback, etc.
  52.         "GSelCommand";                            // Handling mousedowns
  53.         "GWriteLn"
  54.     };
  55. };
  56.  
  57. resource 'res!' (kForDebugging,
  58. #if qNames
  59.     "ForDebugging",
  60. #endif
  61.     purgeable) {
  62.     {
  63.         "GDebug";
  64.         "GDebugger";
  65.         "GFields";
  66.         "GInspector";
  67.         "GWriteLn"
  68.     };
  69. };
  70.  
  71. resource 'cmnu' (mDebug,
  72. #if qNames
  73.     "mDebug",
  74. #endif
  75.     nonpurgeable) {
  76.     mDebug,
  77.     textMenuProc,
  78.     0x7FFFFFBF,
  79.     enabled,
  80.     "Debug",
  81.     {
  82. #if qInspector
  83.     "New Inspector Window",                 noIcon, noKey,    noMark, plain,    cNewInspectorWindow;
  84. #endif
  85.     "-",                                    noIcon, noKey,    noMark, plain,    nocommand;
  86.     "Make Front Window Modal",                noIcon, noKey,    noMark, plain,    cModalToggle;
  87.     "Do First Click For This Window",        noIcon, noKey,    noMark, plain,    cDoFirstClick;
  88.     "Refresh Front Window",                 noIcon, "®",    noMark, plain,    cRefreshFrontWindow;
  89.     "-",                                    noIcon, noKey,    noMark, plain,    nocommand;
  90.     "Allow Trace of Menu Setups",            noIcon, noKey,    noMark, plain,    cTraceSetupMenus;
  91.     "Allow Trace During Idle",                noIcon, noKey,    noMark, plain,    cTraceIdle;
  92.     /*"Show Page Breaks",                    noIcon, noKey,    noMark, plain,    cShowBreaks;    */
  93.     "Set system justification",                noIcon, noKey,    noMark, plain,    cSetSysJust;
  94.     "-",                                    noIcon, noKey,    noMark, plain,    nocommand;
  95.     "Enter MacApp Debugger",                noIcon, "`",    noMark, plain,    cEnterMacAppDebugger;
  96.     "Show Debug Transcript",                noIcon, noKey,    noMark, plain,    cDebugWind;
  97.     "Show Software Version",                noIcon, noKey,    noMark, plain,    cIdentifySoftware
  98.     }
  99. };
  100.  
  101.  
  102. /* Debug Buzz-Strings */
  103. resource 'STR#' (kDebugBuzzStrings,
  104. #if qNames
  105.     "DebugBuzzStrings",
  106. #endif
  107.     purgeable) {
  108.      {    /* [1] */    "Make Front Window Modal";
  109.         /* [2] */    "Make Front Window Modeless";
  110.         /* [3] */    "Do First Click For This Window";
  111.         /* [4] */    "Don't Do First Click For This Window";
  112.         /* [5] */    "Set system to right justification";
  113.         /* [6] */    "Set system to left justification"
  114.     }
  115. };
  116.  
  117.  
  118. /* Debug Error-Strings */
  119. resource 'STR#' (kDebugErrorStrings,
  120. #if qNames
  121.     "kDebugErrorStrings",
  122. #endif
  123.     purgeable) {
  124.      {
  125.     "Level 7 Interupt";
  126.     "Bus error:  Invalid memory reference";
  127.     "Address error:  Word or long-word reference made to an odd address";
  128.     "Illegal instruction:  The processor received an instruction it didn't recognize.";
  129.     "Zero divide:  Signed Divide (DIVS) or Unsigned Divide (DIVU) instruction with a divisor of 0 was executed.";
  130.     "Check exception:  Check Register Against Bounds (CHK) instruction was executed and failed.  Pascal 'value out of range' errors are usually reported in this way.";
  131.     "TrapV exception:  Trap On Overflow (TRAPV) instruction was executed and failed.";
  132.     "Privilege violation:  Macintosh always runs in supervisor mode; perhaps an erroneous Return From Execution (RTE) instruction was executed.";
  133.     "Trace exception:  The trace bit in the status register is set.";
  134.     "Line 1010 exception:  The 1010 trap dispatcher has failed.";
  135.     "Line 1111 exception:  Unimplemented instruction";
  136.     "Miscellaneous exception:  All other processor exceptions";
  137.     "Unimplemented core routine:  An unimplemented trap number was encountered.";
  138.     "Spurious interrupt:  The interrupt vector table entry for a particular level of interrupt is NIL; usually occurs with level 4, 5, 6, or 7 interrupts.";
  139.     "I/O system error:  The File Manager is attempting to dequeue an entry from an I/O request queue that has a bad queue type field.";
  140.     "Segment Loader error:  A GetResource call to read a segment into memory failed.";
  141.     "Floating point error:  The halt bit in the floating-point environment word was set.";
  142.     "Can't load package 0:  A GetResource call to read a package into memory failed.";
  143.     "Can't load package 1:  A GetResource call to read a package into memory failed.";
  144.     "Can't load Disk Initialization package:  A GetResource call to read a package into memory failed.";
  145.     "Can't load Standard File package:  A GetResource call to read a package into memory failed.";
  146.     "Can't load Floating Point package:  A GetResource call to read a package into memory failed.";
  147.     "Can't load Trancendentals package:  A GetResource call to read a package into memory failed.";
  148.     "Can't load International Utilities package:  A GetResource call to read a package into memory failed.";
  149.     "Can't load Binary-Decimal package:  A GetResource call to read a package into memory failed.";
  150.     "Can't allocate requested memory block in the heap";
  151.     "Segment Loader error:  A GetResource call to read 'CODE' resource 0 into memory failed; usually indicates a nonexecutable file.";
  152.     "File map destroyed:  A logical block number was found that's greater than the number of the last logical block on the volume or less than the logical block number of the first allocation block on the volume.";
  153.     "Stack overflow error:  The stack has expanded into the heap.";
  154.     "Negative ZcbFree value (Memory manager error.  See TN-151)";
  155.     "The file named 'Finder' can't be found on the disk.";
  156.     "ShutDown Alert";
  157.     "Unserviceable slot interrupt";
  158.     "Bad opcode given to SANE package 4";
  159.     "Menu Manager tried to access a menu that's been purged.";
  160.     "Menu bar not found";
  161.     "Menu find error";
  162.     "Can't mount system startup volume.  The system couldn't read the system resource file into memory.";
  163.     "'Sorry, a system error occurred':  Default alert message";
  164.     "Mem Mgr Err";
  165.     "Unlisted error.  See IM III-205"
  166.      }
  167. };
  168.  
  169.  
  170. #if qTemplateViews
  171. resource 'view' (kTranscriptWindowType,
  172. #if qNames
  173.     "TranscriptWindowType",
  174. #endif
  175.     purgeable)  { {
  176.     root, 'WIND', { 270, 40 }, { 80, 410 }, sizeVariable, sizeVariable, notShown, enabled,
  177.     Window {
  178.         "",
  179.             zoomDocProc, goAwayBox, resizable, modeless, ignoreFirstClick, dontFreeOnClosing,
  180.             disposeOnFree, closesDocument, openWithDocument, dontAdaptToScreen,
  181.             dontStagger, ForceOnScreen, dontCenter, kIDTranscriptView, "Debug Transcript <<<>>>" };
  182.  
  183.     'WIND', 'SCLR', { 0, 0 }, { 80-kSBarSizeMinus1, 410-kSBarSizeMinus1 },
  184.     sizeRelSuperView, sizeRelSuperView, shown, enabled,
  185.     Scroller {
  186.         "",
  187.             vertScrollBar, horzScrollBar, 0, 0, 16, 16,
  188.             vertConstrain, horzConstrain, { 0, 0, 0, 0 } };
  189.     
  190.     'SCLR', kIDTranscriptView, { 0, 0 }, { 500, 500 }, sizeVariable, sizeVariable, shown, disabled,
  191.     View {
  192.         "TTranscriptView" }
  193. } };
  194. #else
  195.  
  196. /* This guy is used when the template stuff isn't */
  197. resource 'WIND' (kTranscriptWindowType,
  198. #if qNames
  199.     "TranscriptWindowType",
  200. #endif
  201.     purgeable) {
  202.     {20, 20, 250, 215},
  203.     zoomDocProc,
  204.     invisible,
  205.     goAway,
  206.     0x0,
  207.     "Debug Transcript <<<>>>"
  208. };
  209. #endif
  210.  
  211. resource 'SICN' (kDebugSICN,
  212. #if qNames
  213.     "MacApp® Debugger",
  214. #endif
  215.     purgeable) {
  216.     {    /* array: 1 elements */
  217.         /* [1] */
  218.         $"00 00 FF FF FF FF FF FF 00 00 88 8E D9 49 AA 29"
  219.         $"8B E9 8A 29 8A 2E 00 00 FF FF FF FF FF FF"
  220.     }
  221. };
  222.  
  223.